home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / New System Software Extensions / QuickDraw™ GX 1.1.2 / Programming Stuff / Sample Code / Graphics Samples / Test Cubics (cubic to quad) ƒ / TestCubics.h < prev    next >
Encoding:
Text File  |  1995-04-10  |  3.0 KB  |  128 lines  |  [TEXT/MPS ]

  1. /*---------------------------------------------------------------------------------------------
  2. FILENAME
  3.     TestClip.h
  4.     
  5. DESCRIPTION
  6.     This is the include file to the test program for the vector clipping system
  7.     
  8. COPYRIGHT
  9.     ©1992 Copyright Apple Computer, Inc.
  10.     All rights reserved.
  11.     
  12. ---------------------------------------------------------------------------------------------*/
  13.  
  14. //#ifdef MakeDumpFile
  15.  
  16. #include <Controls.h>
  17. #include <CursorCtl.h>
  18. #include <Desk.h>
  19. #include <Dialogs.h>
  20. #include <Events.h>
  21. #include <Fonts.h>
  22. #include <Memory.h>
  23. #include <Menus.h>
  24. #include <OSUtils.h>
  25. #include <Packages.h>
  26. #include <Palettes.h>
  27. #include <Picker.h>
  28. #include <Quickdraw.h>
  29. #include <Resources.h>
  30. #include <Scrap.h>
  31. #include <SegLoad.h>
  32. #include <TextEdit.h>
  33. #include <ToolUtils.h>
  34. #include <Windows.h>
  35. #include <Values.h>
  36. #include <FixMath.h>
  37. #include <Math.h>
  38. #include <stdio.h>
  39.  
  40. #include "TestCubicsRef.h"
  41.  
  42. #define debugging
  43.  
  44. #include <graphics routines.h>
  45. #include <graphics toolbox.h>
  46. #include <graphics libraries.h>
  47. #include <graphics debugging.h>
  48. #include <graphics state library.h>
  49.  
  50.  
  51. #define kSysEnvVers    1
  52. #define kOsEvent    app4Evt
  53. #define kSusResMes    1
  54. #define kResMask    1
  55. #define kMouseMoved    0xFA
  56. #define extremeNeg    -32768
  57. #define extremePos     32767 - 1
  58. #define kMinDocSize        64
  59.  
  60. #define kGrowBHeight    17
  61. #define kGrowBWidth        17
  62. #define kCloseEnough    3
  63. #define kThick            2
  64.  
  65. enum {    kCursInit,
  66.         kCursArrow,
  67.         kCursCross,
  68.         kCursHand,
  69.         kCursWatch
  70. };
  71.  
  72.  
  73. #define TopLeft(aRect)    (* (Point *) &(aRect).top)
  74. #define BotRight(aRect)    (* (Point *) &(aRect).bottom)
  75. #define HiWrd(aLong)    (((aLong) >> 16) & 0xFFFF)
  76. #define LoWrd(aLong)    ((aLong) & 0xFFFF)
  77.  
  78. extern void _DataInit();
  79.  
  80. typedef struct {
  81.     CWindowRecord    docWindow;
  82.     gxViewPort    vp;
  83.     long        count;
  84.     gxPoint       **data;
  85.  
  86. } DocumentRecord, *DocumentPeek;
  87.  
  88.  
  89. /* prototypes for TestClip.c */
  90.  
  91. void EventLoop(void);
  92. void DoEvent(EventRecord *event, short *cursFlag);
  93. void AdjustCursor(EventRecord *event, short *cursFlag);
  94. void DoGrowWindow(WindowPtr window, EventRecord *event);
  95. void DoZoomWindow(WindowPtr window, short part);
  96. void ResizeWindow(WindowPtr window);
  97. void DoUpdate(WindowPtr    window);
  98. void DoContentClick(WindowPtr window,EventRecord *event,short *cursFlag);
  99. short DoCubicDrag( gxPoint *, Point, DocumentPeek );
  100.  
  101. void SetWorkRect(WindowPtr window, Rect    *pinRect, Rect *limitRect);
  102. void Initialize( void );
  103. void DrawControlHandle( gxPoint * );
  104. void DrawCubicNumbers( DocumentPeek );
  105. void DrawCubicControl( gxShape );
  106. void DrawWindow(WindowPtr window);
  107. void DrawCurves( gxPoint **data );
  108. void DrawMyGrow(WindowPtr window);
  109. void AdjustMenus( void );
  110. void DoMenuCommand(long menuResult);
  111. void DoCloseWindow(WindowPtr window);
  112. Boolean IsAppWindow(WindowPtr window);
  113. Boolean IsDAWindow(WindowPtr window);
  114.  
  115. void ExitApplication( WindowPtr );
  116. long CountQuadratics( const cubic * );
  117.  
  118. gxShape NewCubic(  const cubic * );
  119. gxShape NewCubic2( const cubic *, const long );
  120.  
  121. /******
  122. #pragma dump ":Objects:DumpFile"
  123.  
  124. #else
  125.  
  126. #pragma load ":Objects:DumpFile"
  127.  
  128. #endif***/